package com.wgts.wgts.dagger.module;

import com.wgts.wgts.dagger.scope.ActivityScope;
import com.wgts.wgts.mvp.model.ILoginActivityModel;
import com.wgts.wgts.mvp.model.IMainActivityModel;
import com.wgts.wgts.mvp.model.imp.MainActivityModel;
import com.wgts.wgts.mvp.presenter.IMainActivityPersenter;
import com.wgts.wgts.mvp.presenter.imp.MainActivityPersenter;
import com.wgts.wgts.mvp.view.IMainActivityView;
import com.wgts.wgts.netmodle.NetService;
import com.wgts.wgts.tools.VipMessageDate;

import dagger.Module;
import dagger.Provides;

/*
 *
 *
 *   data:2018/9/2615:35
 *
 */

@Module
public class MainActivityModule {
     private IMainActivityView view;

    public MainActivityModule(IMainActivityView view) {
        this.view = view;
    }

    @Provides
    @ActivityScope
    public IMainActivityView provideView(){
        return view;
    }

    @Provides
    @ActivityScope
    public IMainActivityModel provideModel(NetService netService, VipMessageDate vipMessageDate){
        return new MainActivityModel(netService, vipMessageDate);
    }

    @Provides
    @ActivityScope
    public IMainActivityPersenter providePersenter(IMainActivityModel model, IMainActivityView view){
        return new MainActivityPersenter(model, view);
    }
}
